export default [
  {
    path: '/service',
    redirect: '/service/release'
  },
  {
    path: '/service/release',
    component: resolve => require(['modules/service/Release'], resolve)
  },
  /**
   * @param{releaseType} 发布类型 product => 实体商品  activity => 活动
   * 注：此发布类型要和下面一致
   */
  {
    path: '/service/release/:releaseType', // 发布活动
    component: resolve => require(['modules/service/ReleaseInfo'], resolve)
  },
  /**
   * @param{releaseType} 发布类型 product => 实体商品  activity => 活动
   * @param{editType} 编辑类型 draft => 草稿 edit => 编辑 republish => 重新发布
   * @param{goodsCode} 商品code
   * @param{goodsCateCode} 商品分类code
   */
  {
    path: '/service/release/:releaseType/:editType/:goodsCode/:goodsCateCode', // 活动编辑 详情
    name: 'goodsEdit',
    component: resolve => require(['modules/service/ReleaseInfo'], resolve)
  },
  // 下一期  位置先留着
  // {
  //   path: '/service/release/product', // 发布商品
  //   component: resolve => require(['modules/service/ReleaseInfo'], resolve)
  // },
  {
    path: '/service/list',
    redirect: '/service/list/underway',
    component: resolve => require(['modules/service/List'], resolve),
    children: [
      {
        path: '/service/list/:type',
        component: resolve => require(['modules/service/components/ListItem'], resolve)
      }
    ]
  },
  {
    path: '/service/detail/:serviceId',
    name: 'detail',
    component: resolve => require(['modules/service/Detail'], resolve)
  }
]
